<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center myPosts_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub myPosts_fd0_0'>
          <view class='flex flex-wrap align-center myPosts_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  myPosts_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='myPosts_fd0_0_c1_c0'>我的发布</text>
          </view>
          <view class='flex flex-wrap align-center justify-end myPosts_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center">
        <view>
          <benben-flex-tabs class-name='myPosts_benbenTabsfd1_0' v-model="cateId" ref="benben_tabsfd1_0"
            select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='false' :top='0'
            :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd1_0">

            <scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
              class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd1_0.moveX"
              scroll-with-animation="all .3s ease">
              <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
                <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex flex align-center justify-around">
                  <view :class="{ 'checkTitlefd1_0': cateId == '1', 'flex flex-wrap align-center': true }"
                    @tap="chooseCate('1')" :id="`benben_tabsfd1_0-title-item-${'1'}`">

                    <text>我的租房</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': cateId == '2', 'flex flex-wrap align-center': true }"
                    @tap="chooseCate('2')" :id="`benben_tabsfd1_0-title-item-${'2'}`">

                    <text>我的招工</text>

                  </view>
                </view>
                <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
                  id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line myPosts_linefd1_0">
                </view>
              </view>
            </scroll-view>

          </benben-flex-tabs>

        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---我的租房flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPosts_flex_2" v-if=" cateId=='1'">
        <view class='flex flex-wrap align-stretch myPosts_fd2_0' v-for="(item,index) in dataList" :key="index"
          @tap.stop="handleJumpDiy" data-type="navigateTo"
          :data-url="`/pages/homePage/propertydetails/propertydetails?aid=${item.aid}`">
          <view class='flex flex-wrap align-start myPosts_fd2_0_c0'>
            <text class='myPosts_fd2_0_c0_c0'>{{item.rental_method_name }}</text>
            <image class='myPosts_fd2_0_c0_c1' mode="aspectFill" :src='item.images[0]'></image>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch flex-sub myPosts_fd2_0_c1'>
            <view class='flex flex-wrap align-center'>
              <view class='text-cut-2 myPosts_fd2_0_c1_c0_c0'>{{item.title}}</view>
            </view>
            <view class='flex flex-wrap align-center myPosts_fd2_0_c1_c1'>
              <image class='myPosts_fd2_0_c1_c1_c0' mode="aspectFit" :src='STATIC_URL+"156.png"'></image>
              <text class='myPosts_fd2_0_c1_c1_c1'>{{item.location_name}}</text>
            </view>
            <view class='flex flex-wrap align-center'>
              <text class='myPosts_fd2_0_c1_c2_c0' v-if="item.house_type_name">{{item.house_type_name}}</text>
              <text class='myPosts_fd2_0_c1_c2_c0' v-if="item.house_towards_name">{{item.house_towards_name}}</text>
              <text class='myPosts_fd2_0_c1_c2_c0' v-if="item.total_floor_name">{{item.total_floor_name}}</text>
              <text class='myPosts_fd2_0_c1_c2_c0' v-if="item.area">{{item.area}}㎡</text>
            </view>
            <view class='flex flex-wrap align-center myPosts_fd2_0_c1_c3'>
              <text class='myPosts_fd2_0_c1_c3_c0'>{{item.rent}}</text>
              <text class='myPosts_fd2_0_c1_c3_c1'>元/月</text>
            </view>
          </view>
          <!-- 已下架 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==3" :src='STATIC_URL+"170.png"'>
          </image>
          <!-- 审核中 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==0" :src='STATIC_URL+"180.png"'>
          </image>
          <!-- 审核拒绝 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==2" :src='STATIC_URL+"182.png"'>
          </image>
          <!-- 审核成功 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==1" :src='STATIC_URL+"183.png"'>
          </image>
        </view>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---我的租房flex布局结束-->
      <!---我的招工flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myPosts_flex_3" v-if=" cateId=='2'">
        <view class='flex flex-wrap align-stretch position-relative myPosts_fd3_0' v-for="(item,index) in dataList"
          :key="index" @tap.stop="handleJumpDiy" data-type="navigateTo"
          :data-url="`/pages/homePage/directDetail/directDetail?aid=${item.aid}`">
          <view class='flex flex-wrap align-start myPosts_fd3_0_c0'>
            <image class='myPosts_fd3_0_c0_c0' mode="aspectFill" :src='item.images[0]'></image>
          </view>
          <view class='flex flex-direction flex-wrap align-stretch flex-sub myPosts_fd3_0_c1'>
            <view class='flex flex-wrap align-center justify-between'>
              <text class='myPosts_fd3_0_c1_c0_c0'>{{item.job_type_name}}</text>
              <text class='myPosts_fd3_0_c1_c0_c1'>{{item.create_time}}</text>
            </view>
            <view class='flex flex-wrap align-center myPosts_fd3_0_c1_c1'>
              <text class='myPosts_fd3_0_c1_c1_c0'>{{item.intended_wage}}</text>
              <text class='myPosts_fd3_0_c1_c1_c1'>元/{{item.settle_type_name}}</text>
            </view>
            <view class='flex flex-wrap align-center myPosts_fd3_0_c1_c2'>
              <view class='text-cut-2 myPosts_fd3_0_c1_c2_c0' style="width: 430rpx;">
                {{item.company_name}}
              </view>
            </view>
            <view class='flex flex-wrap align-center myPosts_fd3_0_c1_c3'>
              <text class='myPosts_fd3_0_c1_c3_c0' v-if="item.part_job_name">{{item.part_job_name}}</text>
              <text class='myPosts_fd3_0_c1_c3_c0' v-if="item.job_education_name">{{item.job_education_name}}</text>
              <text class='myPosts_fd3_0_c1_c3_c0' v-if="item.job_years_name">{{item.job_years_name}}</text>
            </view>
            <view class='flex flex-wrap align-center' v-if="item.content">
              <text class='myPosts_fd3_0_c1_c4_c0'>{{item.content}}</text>
            </view>
          </view>
          <!-- 已下架 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==3" :src='STATIC_URL+"170.png"'>
          </image>
          <!-- 审核中 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==0" :src='STATIC_URL+"180.png"'>
          </image>
          <!-- 审核拒绝 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==2" :src='STATIC_URL+"182.png"'>
          </image>
          <!-- 审核成功 -->
          <image class='myPosts_fd2_0_c2' mode="aspectFit" v-if="item.apply_status==1" :src='STATIC_URL+"183.png"'>
          </image>
        </view>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---我的招工flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "tabsInfofd1_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "cateId": "1",
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        dataList: []
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      chooseCate(type) {
        this.cateId = type
        this.getListFunc()
      },
      getListFunc() {
        let urlData = ''
        if (this.cateId == 1) { //我的租房
          urlData = global.apiUrls.post6676a40e6b984
        } else {
          urlData = global.apiUrls.post6676a46649962
        }
        this.minixPagingListsApi = urlData;
        this.pageingListApiMethod = 'post';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {}
        this.listData = [];
        this.dataList = this.listData;
        this.pagingListToggle();
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .myPosts_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .myPosts_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .myPosts_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .myPosts_fd0_0_c0 {
    width: 120rpx;
  }

  .myPosts_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .myPosts_linefd1_0 {
    background: rgba(255, 111, 2, 1);
    width: 40rpx;
    height: 6rpx;
    top: 80rpx;
    background-size: 100% auto;
    border-radius: 3rpx;
  }

  .checkTitlefd1_0 {
    font-weight: 700 !important;
    font-size: 28rpx !important;
    color: #FF6F02 !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .myPosts_benbenTabsfd1_0 {
    background: #fff;
    width: 750rpx;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
  }

  .myPosts_flex_2 {
    background: var(--benbenbgColor1);
    padding: 24rpx 24rpx 0rpx 24rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    background-size: 100% 100%;
    height: 100vh;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .myPosts_fd2_0_c2 {
    width: 89rpx;
    height: 102rpx;
    position: absolute;
    right: 0rpx;
    top: 0rpx;
    z-index: 8;
  }

  .myPosts_fd2_0_c1_c3_c1 {
    font-size: 22rpx;
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .myPosts_fd2_0_c1_c3_c0 {
    font-size: 36rpx;
  }

  .myPosts_fd2_0_c1_c3 {
    color: rgba(251, 99, 80, 1);
    margin: 4rpx 0rpx 0rpx 0rpx;
  }

  .myPosts_fd2_0_c1_c2_c0 {
    background: #F2F3F9;
    margin: 0rpx 12rpx 12rpx 0rpx;
    border-radius: 4rpx 4rpx 4rpx 4rpx;
    line-height: 40rpx;
    font-size: 24rpx;
    // width: 68rpx;
    padding: 0 8rpx;
    height: 40rpx;
    text-align: center;
    color: rgba(93, 114, 169, 1);
  }

  .myPosts_fd2_0_c1_c1_c1 {
    font-size: 24rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 380rpx;
  }

  .myPosts_fd2_0_c1_c1_c0 {
    width: 32rpx;
    height: 32rpx;
    margin: 0rpx 10rpx 0rpx 0rpx;
  }

  .myPosts_fd2_0_c1_c1 {
    margin: 11rpx 0rpx 10rpx 0rpx;
  }

  .myPosts_fd2_0_c1_c0_c0 {
    font-size: 32rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .myPosts_fd2_0_c1 {
    width: 450rpx;
  }

  .myPosts_fd2_0_c0_c1 {
    width: 240rpx;
    height: 200rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .myPosts_fd2_0_c0_c0 {
    background: url(image-path('155.png')) no-repeat;
    background-size: 100% 100%;
    position: absolute;
    z-index: 9;
    top: 0rpx;
    left: 0rpx;
    font-size: 24rpx;
    color: var(--benbenFontColor3);
    padding: 4rpx 10rpx 4rpx 10rpx;
  }

  .myPosts_fd2_0_c0 {
    margin: 0rpx 24rpx 0rpx 0rpx;
    width: 240rpx;
    height: 200rpx;
    position: relative;
  }

  .myPosts_fd2_0 {
    background: #FFFFFF;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    margin: 0rpx 0rpx 24rpx 0rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
    position: relative;
  }

  .myPosts_flex_3 {
    background: var(--benbenbgColor1);
    padding: 24rpx 24rpx 0rpx 24rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    background-size: 100% 100%;
    height: 100vh;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .myPosts_fd3_0_c1_c4_c0 {
    font-size: 24rpx;
  }

  .myPosts_fd3_0_c1_c3_c0 {
    background: #F2F3F9;
    margin: 0rpx 12rpx 0rpx 0rpx;
    border-radius: 4rpx 4rpx 4rpx 4rpx;
    line-height: 40rpx;
    font-size: 24rpx;
    // width: 68rpx;
    padding: 0 8rpx;
    height: 40rpx;
    text-align: center;
    color: rgba(93, 114, 169, 1);
  }

  .myPosts_fd3_0_c1_c3 {
    margin: 8rpx 0rpx 16rpx 0rpx;
  }

  .myPosts_fd3_0_c1_c2_c0 {
    font-size: 24rpx;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    width: 420rpx;
  }

  .myPosts_fd3_0_c1_c2 {
    margin: 11rpx 0rpx 10rpx 0rpx;
  }

  .myPosts_fd3_0_c1_c1_c1 {
    font-size: 22rpx;
    margin: 0rpx 0rpx 0rpx 12rpx;
  }

  .myPosts_fd3_0_c1_c1_c0 {
    font-size: 36rpx;
  }

  .myPosts_fd3_0_c1_c1 {
    color: rgba(251, 99, 80, 1);
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .myPosts_fd3_0_c1_c0_c1 {
    color: var(--benbenFontColor2);
    font-size: 24rpx;
  }

  .myPosts_fd3_0_c1_c0_c0 {
    font-size: 32rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .myPosts_fd3_0_c1 {
    width: 450rpx;
  }

  .myPosts_fd3_0_c0_c0 {
    width: 240rpx;
    height: 300rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .myPosts_fd3_0_c0 {
    margin: 0rpx 24rpx 0rpx 0rpx;
    width: 240rpx;
    height: 300rpx;
    position: relative;
  }

  .myPosts_fd3_0 {
    border-bottom: 1px solid #eee;
    background: #FFFFFF;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    margin: 0rpx 0rpx 24rpx 0rpx;
    padding: 24rpx 0rpx 24rpx 0rpx;
  }
</style>
